//读取cookie值
window.onload=function(){
	Cookies.get('userId'); // => 'value'
	var userId=Cookies.get('userId');
	
	var userId= $('.userId').val(userId);
    	var userId=$('.userId').val();
//获取所有cookie
Cookies.get(); // => { name: 'value' }
	
}

	
 

function cc(){
	console.log(name);
	function getCookie(cname)
		{
		  var name = cname + "=";
		  var ca = document.cookie.split(';');
		  for(var i=0; i<ca.length; i++) 
		  {
		    var c = ca[i].trim();
		    if (c.indexOf(name)==0) return c.substring(name.length,c.length);
		  }
		  return "";
		}
	
	
	
	
	var nameEQ = name; 
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		var Cookie=name.srcElement.cookie;
		    //将json转为字符串；
		    //userId
		var sxrxq_str = getCookie("userId");		
		    //模拟数据从cookie拿到的数据
	    var value = JSON.parse(sxrxq_str); 
		var userId=value.userId;	
		var userId= $('.userId').val(userId);
    	var userId=$('.userId').val();
//  	console.log(userId);
		//pbId
    	var sxrxq_str1 = getCookie("bpId");
    	var value1 = JSON.parse(sxrxq_str1);
    	var bpId=value1.bpId;   	  
//  	var bpId= $('.pbId').val(bpId);
//  	var bpId=$('.pbId').val();
//  	console.log(bpId);
//console.log(name.composed);

	}
	return null;
}
